This invention relates generally to mirrored databases used for online transaction processing (OLTP), and more particularly to managing on-line transitions between mirror states for the resynchronization of a mirrored database.
Enterprises employ database systems comprising mirrored databases as a repository of the enterprise's stored data, and to support operational systems such as online transaction processing (OLTP). The databases generally have large sizes, store large volumes of data in tables, and experience high numbers of online transactions.
Mirrored databases comprise a primary database and a mirror database pair that are synchronized by redundantly writing the same data to both databases for backup and to assure high availability of the data if one of the databases fails (crashes). In the event of a crash, or loss of communications with a database, the database transitions from a synchronized mirror state to a different mirror state where changes are tracked. Subsequently, it transitions to a state where a mirror resynchronization process must be performed to catch up lost changes and any new changes resulting from new online transactions while the mirror database was down in order to restore the databases to a synchronized state.
During such mirror state database transitions, suspensions of service occur which may be quite lengthy, particularly if long full directory scans are necessary to discover missing file-system objects (files and directories), of if mirror resynchronization is inefficient and lengthy. These adversely impact availability and quality-of-service. An important measure of database service availability is the time it takes for a mirror database to take over processing once a failure of the primary database has been detected. This time is referred to as the mean-time-to-repair (MTTR). Accordingly, it is important that lengthy mirror state transitions be avoided and that resynchronization be performed timely and efficiently so that the database has a very good repair-time and high-availability.
It is desirable to provide systems and methods that address these and other problems by avoiding lengthy mirror state transitions and affording timely resynchronization of mirrored databases while writing data directly to database files, and it is to these ends that the present invention is directed.